package com.zhuhjay.common.base.enums;

import lombok.Getter;

/**
 * @author ZhuHJay
 * @date 2023/2/25 0:45
 */
@Getter
public enum HttpCode {
    /** 状态码 **/
    SUCCESS(200, "操作成功"),
    UPDATE_SUCCESS(201, "修改成功"),
    DELETE_SUCCESS(202, "删除成功"),
    USER_ERROR(300, "操作失败"),
    LOGIN_FAILURE(401, "登录失效"),
    FORCED_TO_LOGOFF(402, "被迫下线"),
    LIMITED_ACCESS(403, "访问受限"),
    SERVER_ERROR(500, "出错啦！请稍后重试");

    private final int code;
    private final String desc;

    HttpCode(int code, String desc){
        this.code = code;
        this.desc = desc;
    }
}
